/*
 * $Id: StaffGetEmployeeByTest.java 81 2012-12-13 16:34:51Z Denis.Skalsky@gmail.com $
 */
package com.globallogic.skalskyy.javabasic.valstaff;

import static org.junit.Assert.assertEquals;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

public class StaffGetEmployeeByTest extends StaffTestFixture {

	@Test
	public void testGetEmployeeByFirstName() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(this.DenysSkalskyy);
		result.add(this.DenysKorablev);

		assertEquals(result,  this.staff.findByFirstName("Denys"));
	}

	@Test
	public void testGetEmployeeBySecondName() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(this.DenysSkalskyy);

		assertEquals(result, this.staff.findBySecondName("Skalskyy"));
	}
	
	@Test
	public void testGetEmployeeByPosition() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(NastyaLogvinova);
		result.add(DenysKorablev);
		
		assertEquals(result, this.staff.findByPosition("QA lead engineer"));		
	}

	@Test
	public void testGetEmployeeByDateOfBirth() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(DenysSkalskyy);
		
		assertEquals(result, this.staff.findByDateOfBirth("16 September"));
	}

	@Test
	public void testGetEmployeeByLanguage() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(DenysSkalskyy);
		result.add(SergiiSyabruk);
		
		assertEquals(result, this.staff.findByLanguage("java"));
	}	

	@Test
	public void testGetEmployeeByTesterType() {
		List<Employee> result = new ArrayList<Employee>();
		result.add(NastyaLogvinova);
		
		assertEquals(result, this.staff.findByTesterType("automation"));
	}
}
